﻿#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    scene = new GraphicsScene();

    ui->graphicsView->setScene(scene);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_addPix_clicked()
{
    QPixmap pix("../QtImageTool/number.jpg");
    scene->SetBackGroundImage(pix, ui->graphicsView->width(), ui->graphicsView->height());
//    qDebug()<<__FUNCTION__<<__LINE__<<ui->graphicsView->width()<<ui->graphicsView->height();
}
